﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:Visualizacao3D"
                    xmlns:ctrls="clr-namespace:Visualizacao3D.Controls">

  <ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="/PaperLite;component/Paper%20Gray%20Animated.xaml" />

    <ResourceDictionary Source="Resources/BrushResources.xaml" />
    <ResourceDictionary Source="Resources/ControlResources.xaml" />
  </ResourceDictionary.MergedDictionaries>

  <Style TargetType="{x:Type ctrls:ExercicioFrame}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ctrls:ExercicioFrame}">
          <Grid Background="{DynamicResource LightBrush}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="0.7*" />
              <ColumnDefinition Width="0.3*" />
            </Grid.ColumnDefinitions>
            <ContentPresenter Content="{TemplateBinding Content}"
                              DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" />
            <Grid Grid.Column="1">
              <Grid.RowDefinitions>
                <RowDefinition Height="0.7*"
                               MinHeight="250" />
                <RowDefinition Height="0.3*" MinHeight="120" />
              </Grid.RowDefinitions>

              <!-- CONFIGURAÇÕES -->
              <Rectangle Grid.Row="0"
                         Style="{StaticResource Rectangle_Panel}" />
              <StackPanel Grid.Row="0"
                          Margin="10">
                <CheckBox x:Name="mostrarVetores"
                          IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MostrarVetores}">Mostrar forças e momentos</CheckBox>
                <CheckBox x:Name="mostrarBarras"
                          IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MostrarBarras}">Mostrar barras</CheckBox>
                <CheckBox x:Name="mostrarApoios"
                          IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MostrarApoios}">Mostrar apoios</CheckBox>
                <CheckBox Margin="0,10,0,0"
                          x:Name="mostrarBoundingBox"
                          IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MostrarBoundingBox}">Mostrar "gaiola"</CheckBox>
                <CheckBox x:Name="mostrarEixos"
                          IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MostrarEixos}">Mostrar eixos</CheckBox>

                <CheckBox Margin="0,10,0,0"
                          x:Name="mostrarGraficos"
                          IsChecked="False">Mostrar diagramas</CheckBox>
                <StackPanel x:Name="selecaoGraficos"
                            Margin="20,0,0,0">
                  <RadioButton x:Name="mostrarGraficosNormais"
                               GroupName="MostrarGraficos"
                               IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MostrarGraficosNormais}"
                               IsEnabled="{Binding ElementName=mostrarGraficos, Path=IsChecked}">Normais</RadioButton>
                  <RadioButton  x:Name="mostrarGraficosCortantes"
                                GroupName="MostrarGraficos"
                                IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MostrarGraficosCortantes}"
                                IsEnabled="{Binding ElementName=mostrarGraficos, Path=IsChecked}">Cortantes</RadioButton>
                  <RadioButton  x:Name="mostrarGraficosFletores"
                                GroupName="MostrarGraficos"
                                IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MostrarGraficosFletores}"
                                IsEnabled="{Binding ElementName=mostrarGraficos, Path=IsChecked}">Momentos Fletores</RadioButton>
                  <RadioButton  x:Name="mostrarGraficosTorcores"
                                GroupName="MostrarGraficos"
                                IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MostrarGraficosTorcores}"
                                IsEnabled="{Binding ElementName=mostrarGraficos, Path=IsChecked}">Momentos Torçores</RadioButton>
                </StackPanel>

                <Button Margin="0,20,0,0"
                        x:Name="resetCamera"
                        Height="23">Reinicializar Câmera</Button>

              </StackPanel>

              <!-- LEGENDA -->
              <Rectangle Grid.Row="1"
                         Style="{StaticResource Rectangle_Panel}" />
              <StackPanel Grid.Row="1"
                          Margin="10">
                <TextBlock FontWeight="Bold"
                           Margin="0,0,0,10">Legenda</TextBlock>

                <Label Style="{StaticResource Control_Legenda}"
                       Background="{StaticResource Brush_Forca}">Força</Label>
                <Label Style="{StaticResource Control_Legenda}"
                       Background="{StaticResource Brush_Momento}">Momento</Label>
                <Label Style="{StaticResource Control_Legenda}"
                       Background="{StaticResource Brush_Carga}">Carga Distribuída</Label>

              </StackPanel>
            </Grid>

          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
</ResourceDictionary>
